This invention relates generally to memory devices and more particularly to a fast and efficient means for clearing memory.
Computers are known to include a central processing unit, system memory, video graphics circuitry, audio processing circuitry, and peripheral ports. The peripheral ports enable the central processing unit to interact with peripheral devices such as printers, monitors, external tape drives, etc. As such, when the central processing unit is executing an application, the central processing unit may interface with any of the peripheral devices and/or with the system memory, video graphics circuitry, and audio processing circuitry. The programming instructions to execute such applications are stored in the system memory, on floppy disk, etc.
The video graphics circuitry includes memory that is used for intermediate processing of data for display on the computer monitor and for storing programming instructions that are executed by the video graphic circuit. In preparing data for presentation on the monitor, the video graphics circuitry receives data from the central processing unit, which outlines the images to be displayed. The video graphic circuit processes the data utilizing a frame buffer and a Z buffer. The frame buffer stores pixel data that is subsequently displayed. The Z buffer is used to track the depth relationship between objects as they are rendered. For example, a Z value may range from 0 to 1 where a value of 0 represents the most foreground position and the value of 1 represents the most background position. The resolution of the Z values is dependent upon bit size of the values.
While processing images for subsequent display, it is advantageous at times for the video graphics circuitry to clear the Z buffer and/or the frame buffer, or portions thereof For example, the buffers may be cleared when a page flip occurs, i.e., begin processes a next frame of graphics data. The clearing of the buffers may be done in a variety of ways. For example, the buffers may be cleared by writing a word directly into the memory, where the word is representative of null data. To make the writing of null data more efficient, the word may be designated for one location. The memory controller would then cause the null word to be written into a plurality of memory locations. An alternative clearing technique is to indicate that the memory locations of the buffers are available and are subsequently overwritten with new data.
While each of these memory clearing techniques works to clear memory, they require additional processing steps and/or the memory controller to be configured to provide such writing. Therefore, a need exists for a method and apparatus that provides more efficient memory clearing process.